home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 6163 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.1 KB  |  58 lines

  1. Path: newsfeed.kdcol.net!usenet
  2. From: jestre@kdcol.com (Chad Barb)
  3. Newsgroups: comp.lang.c++
  4. Subject: Watcom 10.0 #pragma and C++ class declarations
  5. Date: Sun, 11 Feb 1996 01:18:07 GMT
  6. Organization: KDC-Online Internet Access
  7. Message-ID: <4fjcgd$omj@kdcol.kdcol.com>
  8. Reply-To: jestre@kdcol.com
  9. NNTP-Posting-Host: s02.cs00.io.kdcol.net
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12.  
  13. I am trying to create a screen class in Watcom 10.0.
  14. To do this, I need to use assembly, but I am unclear on the proper
  15. syntax for in-class pragmas.
  16.  
  17. heres the header (abridged):
  18.  
  19. //begin
  20.  
  21. class ScreenClass
  22. {
  23.   public:
  24.   
  25.      void SetMode(unsigned char *);
  26.  
  27. };
  28.  
  29. //end
  30.  
  31. I have tried:
  32.  
  33. //begin
  34.  
  35. #pragma aux ScreenClass::SetMode = \
  36. "mov ah,0"\
  37. "int 0x10"\
  38. parm [al]\
  39. modify [ah];
  40.  
  41. //end
  42.  
  43. and also that same #pragma (without the 'ScreenClass::') within the
  44. code, but none of it compiles and links properly.
  45.  
  46. Right now I've resorted to declaring the assembly as a global
  47. function, and using the in-class one as a shell, but this isn't that
  48. great of a solution.
  49.  
  50. Any help would be appreciated.
  51.  
  52.     /\/\
  53.     o/\o
  54.      0o
  55.      ~~
  56.      \/ - Jestre (jestre@kdcol.com)
  57.  
  58.